<#include "/main.ftl"/>
<@diamondNav/>

<body>

<div id="content-wrapper" style="margin-left: 13%">
    <div style="margin-top: 5%;margin-left: 1%;width: 100%">

      <#if projectShareNode.id??>
            <form action="/projectShareController/updateProjectShare"
      <#else >
             <form action="/projectShareController/addProjectShare"
      </#if>
                   method="post" id="myForm" class="form-horizontal" >
        <div class="form-group">
            <label class="col-md-2 control-label" for="moduleName">模块名称</label>
            <div class="col-md-3">
                <input class="form-control" name="moduleName" type="text" id="moduleName"
                       placeholder="模块名称"
                       value="<#if projectShareNode?? && projectShareNode.moduleName ??>${projectShareNode.moduleName!}</#if>"/>
            </div>
        </div>
        <div class="form-group">
            <span style="margin-left: 17%;color: red;font-size: 20px">${errorMsg!}</span>
        </div>
        <div>
            <input type="hidden" name="pageName" value="ProjectModulePage">
            <input name="id" type="hidden" value="<#if projectShareNode??>${projectShareNode.id!}</#if>">
            <input name="shareType"  type="hidden" value="3">
            <input name="projectId" id="projectId" type="hidden"
                   value="${projectId!}">
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <button type="button" class="btn btn-success " id="back">
                    返回
                </button>
                <button type="reset" class="btn btn-success ">
                    重置
                </button>
                <button type="submit" class="btn btn-success">
                    提交
                </button>
            </div>
        </div>
    </form>
    </div>
</div>
</body>

<script type="text/javascript">
    $("#back").click(function () {
        var projectId =$("#projectId").val();
        window.location.href = "/projectShareController/projectSharePage?shareType=3&projectId="+projectId;
    })
</script>